Microsoft DirectX 8.1 (C++)

IAMDirectSound::GetWindowFocus

The GetWindowFocus method retrieves the window that is handling sound playback for the current media file.

Syntax

HRESULT GetWindowFocus(
  HWND* hWnd,
  BOOL* bMixingOnOrOff
);

Parameters

hWnd

[out]  Specifies a pointer to a window handle as an HWND to receive the handle of the sound playback window. If the returned value is null, the sound isn't associated with a window.

Note   Windows NT 4.0 does not support windowless sound playback.

bMixingOnOrOff

[out]  Specifies a pointer to BOOL to receive whether the sound ix mixed.

Value Description
TRUE The sound is mixed
FALSE The sound is nor mixed.

Return Values

Returns one of the following HRESULT values.

Return code Description
E_FAIL No sound device is available.
E_INVALIDARG The hWnd argument is invalid.
E_NOTIMPL DirectSound isn't installed.
S_OK The method succeeded.

See Also